package cn.com.fattiger.framework.remoting.netty4.common;

import java.io.Serializable;
import java.util.concurrent.atomic.AtomicLong;

public class Invocation implements Serializable {

	private static final long serialVersionUID = -8470546454114039354L;
	/* 确认唯一调用标识   */
	private static final AtomicLong INVOKE_ID = new AtomicLong(0);
	private Long uuid;
	/* 请求参数 :JSON   */
	private String request;
	/* 返回结果 :JSON   */
	private String response;
	
	public Invocation(){
		this.uuid = INVOKE_ID.incrementAndGet();
	}
	
	public Invocation(Long uuid){
		this.uuid = uuid;
	}

	public Long getUuid() {
		return uuid;
	}

	public void setUuid(Long uuid) {
		this.uuid = uuid;
	}

	public String getRequest() {
		return request;
	}

	public void setRequest(String request) {
		this.request = request;
	}

	public String getResponse() {
		return response;
	}

	public void setResponse(String response) {
		this.response = response;
	}

	@Override
	public String toString() {
		return "Invocation [uuid=" + uuid + ", request=" + request + ", response=" + response + "]";
	}

	
}
